<template>
  <div>
    Test组件---测试文件
    <button @click="handle">获取数据</button>
    <br>
    <br>
    <input type="text" v-validate="'required|email'" name="email">
    <span>{{ errors.first('email') }}</span>
    <br>
    <input type="text" v-validate="'required|phone'" name="手机号">
    <span>{{ errors.first('手机号') }}</span>
  </div>
</template>

<script>
// import axios from 'axios'
import ajax from '@/api/ajax'
import {reqCategoryList} from '@/api'
export default {
  name: "Test",
  methods: {
    async handle() {
      // const res = await axios({
      //   url: '/api/product/getBaseCategoryList',
      //   method:'get'
      // })
      // const res = await ajax({
      //   url: '/product/getBaseCategoryList',
      //   method:'get'
      // })
      const res = await reqCategoryList()
      console.log(res);
    }
  },
  mounted() {
    console.log(this.$store);
  }
};
</script>

<style lang="less" scoped>
</style>
